package com.winit.config.common.tools;

import org.springframework.util.CollectionUtils;

import java.util.Map;

public class CollectionUtil {
    //将sourceMap里的k-v putApp至targetMap

    /**
     * sourceMap 具有更高的优先级
     * @param targetMap
     * @param sourceMap
     */
    public static void mergeMap(Map targetMap, Map sourceMap){
        if (!CollectionUtils.isEmpty(sourceMap)){
            targetMap.putAll(sourceMap);
        }
    }
}
